package com.llc.mall.auth.infrastructure.gatewayimpl;

import com.llc.mall.auth.domain.gateway.PermissionGateway;
import com.mall4j.cloud.api.rbac.dto.ClearUserPermissionsCacheDTO;
import com.mall4j.cloud.api.rbac.feign.PermissionFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class PermissionGatewayImpl implements PermissionGateway {

    @Autowired
    private PermissionFeignClient permissionFeignClient;

    @Override
    public void clearUserPermissionsCache(ClearUserPermissionsCacheDTO clearUserPermissionsCacheDTO) {
        permissionFeignClient.clearUserPermissionsCache(clearUserPermissionsCacheDTO);
    }
}
